﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HikvisionDemo
{
    class DeviceManageUtils
    {
        // 设备维护管理

        public static bool CheckOnline(int userId)
        {
            // 检测设备是否在线
            bool result = false;

            result = CHCNetSDK.NET_DVR_RemoteControl(userId, 20005, (IntPtr)0, 0);
            if (result)
            {
                Console.WriteLine($"{userId}用户在线");
            }
            else
            {
                Console.WriteLine($"{userId}用户离线");
            }

            return result;
        }
    }
}
